#ifndef SHAPEITEM_H
#define SHAPEITEM_H

#include <QQuickItem>

class ShapeItem : public QQuickItem
{
    Q_OBJECT
    Q_ENUMS(Type)
    Q_PROPERTY(bool selected READ selected WRITE setSelected NOTIFY selectedChanged)
    Q_PROPERTY(Type shapeType READ shapeType)
public:
    explicit ShapeItem(QQuickItem *parent = 0);
    enum Type { None, Point, Line, Circle, Bezier, Arc, Rect, Polygon, Zoom };

    virtual Type shapeType() const = 0;

    bool selected() const { return m_selected; }
    void setSelected(bool sel);
signals:
    void selectedChanged(bool sel);
protected:
    bool m_selected;
};

#endif // SHAPEITEM_H
